function subscriber(...tmplIds: string[]) {
  return new Promise((resolve, reject) => {
    uni.requestSubscribeMessage({
      tmplIds,
      success(res) {
        resolve(true)
      },
      fail: (fail) => {
        resolve(false)
      }
    })
  })
}
// 可取餐订阅
const mealPickupSubscribe = 'u2VwMXKSkazLmSShzKVoDT-FSp7LvDnLvzPuONJIdhM'
// 订单退款订阅-商家拒单/用户手动取消已支付的订单
const orderRefundSubscription = 'glP_siwKqKmKy2eeJcNX64rcxprS4NjUeAELbLqJBhA'
export default function () {
  return {
    // 订阅器
    subscriber,
    // 订阅
    mealPickupSubscribe,
    orderRefundSubscription
  }
}
